package com.example.stock.service.impl;

import com.example.stock.excel.*;
import com.example.stock.service.MarginTradingService;
import com.example.stock.util.DataUtil;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;

@Slf4j
@Service
public class MarginTradingServiceImpl implements MarginTradingService {

    private List<MarginTrading> marginTradingList;

    @PostConstruct
    private void init() {
        marginTradingList = DataUtil.getListData(MarginTrading.class, ExcelReaderUtil.FILE_OPERATION, "融资融券");
    }

    @Override
    public List<MarginTrading> getMarginTradings() {
        return marginTradingList;
    }
}